import requests from '@/utils/request-proxy'

//获取图片数据   
export const reqGetImgById = (spuId) => requests({ url: `/admin/product/spuImageList/${spuId}`, method: 'get' })

//获取销售属性地址
export const reqGetSpuSaleAttrListById = (spuId) => requests({ url: `/admin/product/spuSaleAttrList/${spuId}`, method: 'get' })

//获取平台属性数据
export const reqGetAttrInfoList = (category1Id, category2Id, category3Id) => requests({ url: `/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`, method: 'get' })



//sku列表
export const reqGetSkuList = (page, limit) => requests({ url: `/admin/product/list/${page}/${limit}`, method: 'get' })

//上架
export const reqOnSale = (skuId) => requests({ url: `/admin/product/onSale/${skuId}`, method: 'get' })

//下架
export const reqCancelSale = (skuId) => requests({ url: `/admin/product/cancelSale/${skuId}`, method: 'get' })

//获取sku详情
export const reqGetSkuDetail = (skuId) => requests({ url: `/admin/product/getSkuById/${skuId}`, method: 'get' })